import numpy as np
from fastdtw import fastdtw
from scipy.spatial.distance import euclidean


# 欧氏距离
def fuzzyDist(A, B):
    n = len(A)
    m = len(B)
    x = np.zeros(n)
    y = np.zeros(m)

    for i in range(n):
        x[i] = A[i]

    for j in range(m):
        y[j] = B[j]

    distance, path = fastdtw(x, y, dist=euclidean)
    return distance

